﻿using System.Collections.ObjectModel;
using Unknown.Source.Access.NormalView;
using Unknown.Source.Entity.NormalView;

namespace Unknown.Source.Business.NormalView
{
    /// <summary>
    /// 表业务抽象类
    /// </summary>
    public abstract class CascadeTableBusiness
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="first">开始行</param>
        /// <param name="last">结束行</param>
        /// <returns>结果</returns>
        public virtual Collection<CascadeTable> ExecuteSelect(int first, int last)
        {
            Collection<CascadeTable> results = new Collection<CascadeTable>();

            CascadeTableAccessCustom access = new CascadeTableAccessCustom();
            results = access.ExecuteSelect(first, last);

            return results;
        }

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns>结果</returns>
        public Collection<CascadeTable> ExecuteSelect()
        {
            Collection<CascadeTable> results = new Collection<CascadeTable>();

            results = this.ExecuteSelect(1, int.MaxValue);

            return results;
        }
    }
}
